#include<stdio.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<unistd.h>
#include<string.h>
int main(){
  
  close(1);
  printf("printf\n");
  int fd = open("log.txt",O_CREAT|O_WRONLY|O_APPEND,0666);
  //const char* buffer = "write\n";
  char buffer[64] = "write\n";
  int ret = write(fd,buffer,strlen(buffer));
  close(1);
  return 0;
}
